home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
nrpas13.zip
/
DF1DIM.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-29
|
549b
|
25 lines
FUNCTION df1dim(x: real): real;
(* Programs using routine DF1DIM must define the type
TYPE
glnarray = ARRAY [1..n] OF real;
They must also define the variables
VAR
ncom: integer;
pcom,xicom: glnarray
in the main routine, and externally assign them values. *)
VAR
df1: real;
j: integer;
xt,df: glnarray;
BEGIN
FOR j := 1 TO ncom DO BEGIN
xt[j] := pcom[j]+x*xicom[j]
END;
dfunc(xt,df);
df1 := 0.0;
FOR j := 1 TO ncom DO BEGIN
df1 := df1+df[j]*xicom[j]
END;
df1dim := df1
END;